{include file='public/header'}
<body>
<div class="sectionY">
	<a href="javascript:history.back()">
		<img src="__PUBLIC__/home/images/a19.png" alt="" class="a1">
	</a>
</div>
	<div class="logo_section1">
		<img src="__PUBLIC__/home/images/materialPreview.png" alt="">
	</div>
	<div class="logo_section2">
		<div class="container2">
			<form action="">
				<div class="f1">
					<img src="__PUBLIC__/home/images/login_icon_user.png" alt="" class="im1">
					<input name="telephone" type="text" class="input1" placeholder="请填写手机号" autocomplete="off">
				</div>
				<div class="f1">
					<img src="__PUBLIC__/home/images/login_icon_pw.png" alt="" class="im2">
					<input name="password" type="password" class="input1" placeholder="请填写密码" autocomplete="off">
				</div>
				<div class="sub">
					<input type="button" id="submit" value="登录">
				</div>
				{include file="public/reg_forget"}
				<div class="ur">
					<span class="s1"></span>
					<a href="{:url('login', ['type'=>2])}" class="s2">验证码登录</a>
					<span class="s3"></span>
				</div>
			</form>
		</div>
	</div>
</body>
<script>
	$(function(){
		$("#submit").click(function () {
			let telephone = $("input[name='telephone']").val();
			let password = $("input[name='password']").val();
			if(telephone == ''){
				modal.msg("请输入手机号");
				return;
			}
			if(password== ''){
				modal.msg("请输入密码");
				return;
			}
			let index = modal.loading();
			$.post(location.href, {telephone:telephone, password:password}, function (res) {
				modal.close(index);
				if(res.result_code == 0){
					modal.msg("登录成功");
					setTimeout(function () {
						location.replace('{:url("Index/index", ["is_login"=>1])}');
					},666);
				}else{
					modal.msg(res.result_info);
				}
			});
		});
	})
</script>
</html>